package main

import (
	"fmt"
	"time"
)

func main() {
	tc := time.NewTicker(time.Second * 5)
	fmt.Println("闹钟启动...")
	go func() {
		var i int = 0
		for v := range tc.C {
			i++
			if i == 4 {
				fmt.Println("over")
				break
			}
			fmt.Println("第", i, "次..", v)
		}
	}()
	time.Sleep(200 * time.Second)
	tc.Stop()
	fmt.Println("over")
}
